package com.jp.factoy.util;

import lombok.Data;

/**
 * Created by Administrator on 2019/6/13.
 */
@Data
public class ResultBuildVo<T> {
    public static ResultVo success(Object data){
        ResultVo resultVo = new ResultVo();
        resultVo.setIsSuccess(true);
        resultVo.setData(data);
        return resultVo;
    }
    public static ResultVo error(String errorMessage, String errorCode){
       ResultVo resultVo = new ResultVo();
        resultVo.setIsSuccess(false);
        resultVo.setErrorMessage(errorMessage);
        resultVo.setErrorCode(errorCode);
        return resultVo;
    }
}
